﻿@namespace BlazorComponent
@typeparam TValue
@typeparam TNumeric
@typeparam TInput
@inherits ComponentPartBase<TInput>

@if (Step > 0 && ShowTicks)
{
    var range = Enumerable.Range(0, Convert.ToInt32(NumTicks) + 1);
    if (Vertical)
    {
        range = range.Reverse();
    }

    <div class="@CssProvider.GetClass("ticks-container")">
        @for (var i = 0; i < range.Count(); i++)
        {
            var index = i;
            <span @key="index" class="@CssProvider.GetClass("tick",index)" style="@CssProvider.GetStyle("tick",index)">
                @if (TickLabels.Count > index)
                {
                    <div class="@CssProvider.GetClass("tick-label")">
                        @TickLabels[index]
                    </div>
                }
            </span>
        }
    </div>
}


